package com.scf.filter;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * 自定义一个servlet filter
 *
 * @author sunchuanfu
 * @since 2025/7/1
 */
public class Filter1 implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
        System.out.println("Filter1 -- " + httpRequest.getRequestURI());
        filterChain.doFilter(servletRequest, servletResponse);
    }

}
